package artid.com.arttogoa;

import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.text.Html;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;


/**
 *
 *
 * 项目名称：ArtworkArtA   
 * 类名称：AboutUsActivity   
 * 类描述：关于我们   
 * 创建人：耿卫斌  
 * 创建时间：2016年5月16日 下午1:12:39      
 *
 */
public class AboutUsActivity extends BaseActivity implements OnClickListener {
	private TextView phone;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about_us);
		setContent(this, getIntent());
		mTittle.setText("关于我们");
		setBack();
		phone = (TextView) findViewById(R.id.aboutus_phone);
		phone.setText(Html.fromHtml("电话：" + "<u>" + "010-64688820" + "</u>"));
		phone.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.aboutus_phone:
				Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "010-64688820"));
				if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
					// TODO: Consider calling
					//    ActivityCompat#requestPermissions
					// here to request the missing permissions, and then overriding
					//   public void onRequestPermissionsResult(int requestCode, String[] permissions,
					//                                          int[] grantResults)
					// to handle the case where the user grants the permission. See the documentation
					// for ActivityCompat#requestPermissions for more details.
					return;
				}
				startActivity(intent);
			break;
		default:
			break;
		}

	}

}
